from flask import Flask
from .main import main

import flask_login
lm = flask_login.LoginManager()


from .v1 import v1

def create_app():
    app = Flask(__name__)
    app.config['SECRET_KEY'] = '123456'
    app.register_blueprint(main)
    app.register_blueprint(v1.v1,url_prefix= '/v1')
    lm.login_view = 'v1.login'

    lm.init_app(app)



    return app

